var dialogManager = require("dialogManager");
cc.Class({
    extends: cc.Component,

    properties: {
        img_pet : {
            default : null,
            type : cc.Node
        },
        pre_items : {
            default : [],
            type : [cc.Node],
        },
        sprArr :{
            default:[],
            type:[cc.SpriteFrame],
        },
    },
    onLoad () {},
    start () {
    },
    show(){
    },
    petItemClick(event){
        cc.vv.audioMgr.playSFX("ui_button");
        var _name = event.target._name;
        var index = _name.replace("pet_chuzhan_Item_", "");
        index = parseInt(index)-1;
        this.img_pet.getComponent(cc.Sprite).spriteFrame = this.sprArr[index];
    }
});
